QuickTime 3 Reference

Previous | Chapter Top | Chapter Contents | Next

Controlling Hardware Scaling

QuickTime 1.6.1 added three functions that allow applications to zoom a monitor ( GDHasScale , GDGetScale , and GDSetScale ). These three functions are considered low-level calls (comparable to SetEntries ) that you should use only when playing back QuickTime movies in a controlled environment with no user interaction. Also, because this capability is not present on all computers, applications should not depend on its availability.

These new functions provide a standard way for you to access the resizing abilities of a user's monitor for playback. Effectively, this allows you to have full screen Cinepak playback on low-end Macintosh computers.

GDHasScale

Returns the closest possible scaling that a particular screen device can be set to in a given pixel depth.

pascal OSErr GDHasScale (
                     GDHandle gdh,
                     short depth,
                     Fixed *scale);
gdh
Contains a handle to a screen graphics device.
depth
Specifies the pixel depth of the screen device.
scale
Points to a fixed point scale value. On input, this field should be set to the desired scale value. On output, this field will contain the closest scale available for the given depth. A scale of 0x10000 indicates normal size, 0x20000 indicates double size, and so on.

DISCUSSION

The GDHasScale function returns scaling information for a particular GDevice for a requested depth. This function allows you to query a GDevice without actually changing it. For example, if you specify 0x20000 but the GDevice does not support it, GDHasScale returns with noErr and a scale of 0x10000. Because this function checks for a supported depth, your requested depth must be supported by the GDevice. GDHasScale references the video driver through the graphics device structure.

RESULT CODES

CDepthErr

-157

The requested depth is not supported

cDevErr

-155

Not a screen device

controlErr

-17

Video driver cannot respond to this call

GDGetScale

Returns the current scale of the given screen graphics device.

pascal OSErr GDGetScale (
                     GDHandle gdh,
                     Fixed *scale,
                     short *flags);
gdh
Contains a handle to a screen graphics device.
scale
Points to a fixed point field to hold the scale result.
flags
Points to a short integer. It returns the status parameter flags for the video driver. For now, 0 is always returned in this field.

RESULT CODES

cDevErr

-155

Not a screen device

controlErr

-17

Video driver cannot respond to this call

GDSetScale

Sets a screen graphics device to a new scale.

pascal OSErr GDSetScale (
                     GDHandle gdh,
                     Fixed scale,
                     short flags);
gdh
Contains a handle to a screen graphics device.
scale
A fixed point scale value.
flags
Points to a short integer. It returns the status parameter flags for the video driver. For now, 0 is always returned in this field.

RESULT CODES

cDevErr

-155

Not a screen device

controlErr

-17

Video driver cannot respond to this call

 


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next